package com.aldobucchi.x.flash.geom
{
	
	import flash.geom.Matrix;
	
	import com.aldobucchi.core.markers.IIncomplete;
	
	
	/**
	 * 
	 * http://groups.csail.mit.edu/graphics/classes/6.837/F01/Lecture07/lecture07.pdf
	 * http://www.leptonica.com/affine.html
	 * 
	 * 
	 * @author aldo.bucchi@gmail.com
	 * 
	 */	
	public class AffineTransformation implements IIncomplete
	{
		
		
		
		private var _transformMatrix:Matrix;
		
		public function get transformMatrix( ):Matrix
		{
			return _transformMatrix;
		}
		
		
		private var seg1:Segment;
		
		private var seg2:Segment;
		
		private var seg3:Segment;
		
		
		
		public function AffineTransformation( seg1:Segment, seg2:Segment = null, seg3:Segment = null )
		{
			
			this.seg1 = seg1;
			this.seg2 = seg2;
			this.seg3 = seg3;						
						
		}



/**
 * An AffineTransform implementation that is initialized by specifying
 * three points and the three points they map to.
 * <p>From http://graphics.lcs.mit.edu/classes/6.837/F01/Lecture07/lecture07.pdf:
 * <pre>
 *      [ x1_ ] = [  x1 y1 1  0  0  0  ] [ a11 ]
 *      [ y1_ ] = [  0  0  0  x1 y1 1  ] [ a12 ]
 *      [ x2_ ] = [  x2 y2 1  0  0  0  ] [ a13 ]
 *      [ y2_ ] = [  0  0  0  x2 y2 1  ] [ a21 ]
 *      [ x3_ ] = [  x3 y3 1  0  0  0  ] [ a22 ]
 *      [ y3_ ] = [  0  0  0  x3 y3 1  ] [ a23 ]
 * x_ = X a
 * Solution: a = Xinv x_
 * </pre>
 */



		private function init( ):void
		{
		
		
		
		}


	}

}

